﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Gtkj.CMS.Common
{
    public class CommonInfo
    {
        public static string WeiXinAppID = System.Configuration.ConfigurationManager.AppSettings["WeiXinAppID"];

        public static string WeiXinAppSercet = System.Configuration.ConfigurationManager.AppSettings["WeiXinAppSercet"];

        public static string WeiXinOauth2url = System.Configuration.ConfigurationManager.AppSettings["WeiXinOauth2url"];

        /// <summary>
        /// 获取用户授权code地址
        /// </summary>
        public static string WeiXinUserCodeAddress = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={0}&redirect_uri={1}&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect";

        /// <summary>
        /// 获取用户授权token地址
        /// </summary>
        public static string WeiXinUserTokenAddress = "https://api.weixin.qq.com/sns/oauth2/access_token?appid={0}&secret={1}&code={2}&grant_type=authorization_code";

        /// <summary>
        /// 获取用户授权信息地址
        /// </summary>
        public static string WeiXinUserInfoAddress = "https://api.weixin.qq.com/sns/userinfo?access_token={0}&openid={1}&lang=zh_CN";

        /// <summary>
        /// 微信退款地址
        /// </summary>
        public static string WinXinRefundAddress = "https://api.mch.weixin.qq.com/secapi/pay/refund";
    }
}
